﻿using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;

namespace GBricks
{
  public struct Unit : IEquatable<Unit>
  {
    private const int HashCodeMagicNumber = 67981;

    public static Unit Value {
      [DebuggerStepThrough]
      get { return default(Unit); }
    }

    public override bool Equals(object obj) {
      return obj is Unit;
    }

    public override int GetHashCode() {
      return HashCodeMagicNumber;
    }

    #region IEquatable<Unit> Members

    public bool Equals(Unit other) {
      return true;
    }

    #endregion IEquatable<Unit> Members

    [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "left", Justification = Justifications.OperatorSignature)]
    [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "right", Justification = Justifications.OperatorSignature)]
    public static bool operator ==(Unit left, Unit right) {
      return true;
    }

    [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "left", Justification = Justifications.OperatorSignature)]
    [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "right", Justification = Justifications.OperatorSignature)]
    public static bool operator !=(Unit left, Unit right) {
      return false;
    }
  }
}
